package com.dididoctor.doctor.Activity.Usercentre.MyPurse;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.dididoctor.doctor.Dialog.adapter.BaseDialog;
import com.dididoctor.doctor.R;


public class MyPurseDialog extends BaseDialog {
    private TextView tv_inawordhint, tv_income_bank,tv_income_cardcode,tv_income_name,tv_incode_money;
    private Context context;
    private String phoneNumber;
    private LinearLayout ll_inawordhint,ll_income_message;
    public MyPurseDialog(Context context, String phoneNumber) {
        super(context);
        this.context = context;
        this.phoneNumber = phoneNumber;
        setContentView(R.layout.dialog_mypurse);

       initview();

    }

    private void initview() {

        ll_inawordhint = (LinearLayout) findViewById(R.id.ll_inawordhint);//一句话提示 ll

        tv_inawordhint = (TextView) findViewById(R.id.tv_inawordhint);//一句话提示 tv

        ll_income_message = (LinearLayout) findViewById(R.id.ll_income_message);//提现信息

        tv_income_bank = (TextView) findViewById(R.id.tv_income_bank);//银行

        tv_income_cardcode = (TextView) findViewById(R.id.tv_income_cardcode);//卡号

        tv_income_name = (TextView) findViewById(R.id.tv_income_name);//持卡人姓名

        tv_incode_money = (TextView) findViewById(R.id.tv_incode_money);//提现金额
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_confirm:
                Intent phoneIntent = new Intent("android.intent.action.CALL",
                        Uri.parse("tel:"+phoneNumber));
                // 启动
                context.startActivity(phoneIntent);
                dismiss();
                break;
            case R.id.tv_cancel:
                dismiss();
                break;
            default:
                break;
        }
        super.onClick(v);
    }

}
